﻿<%@ page language="java" contentType="text/html; charset=UTF-8"   pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 
  <div class="not_right" >
	<div class="not_righttitle" style="width:720px; overflow: hidden;">
		<div class="not_righttitle01">我的课程</div>
		  <div class="course_class">
			<div class="course_class00">分类：</div>
			<a href="javascript:switchMyCourseTab('curriculum', 'allCurri');">
			  <c:choose>
				<c:when test="${null==tabstatus}">
					<c:set value="1" var="tabstatus" scope="page" />
				</c:when>
			  </c:choose>
			  <c:choose>
				<c:when test="${tabstatus=='1'}">
			  		<div class="course_class01">全部</div>
			  	</c:when>
			  	<c:otherwise>
			  		<div class="course_class02">全部</div>
			  	</c:otherwise>
			  </c:choose>
			</a> 
			<a href="javascript:switchMyCourseTab('curriculum', 'vodCurri');">
			  <c:choose>
				<c:when test="${tabstatus=='3'}">
					<div class="course_class01">点播(${topicCount})</div>
				</c:when>
				<c:otherwise>
					<div class="course_class02">点播</div>
				</c:otherwise>
			  </c:choose>
			</a> 
			<a href="javascript:switchMyCourseTab('curriculum', 'topicCurri');">
			  <c:choose>
				<c:when test="${tabstatus=='2'}">
					<div class="course_class01">专题(${topicCount})</div>
				</c:when>
				<c:otherwise>
					<div class="course_class02">专题</div>
				</c:otherwise>
			  </c:choose>
			</a> 
			<a href="javascript:switchMyCourseTab('curriculum', 'faceCurri');">
			  <c:choose>
				<c:when test="${tabstatus=='4'}">
					<div class="course_class01">面授(${faceCount})</div>
				</c:when>
				<c:otherwise>
					<div class="course_class02">面授</div>
				</c:otherwise>
			  </c:choose>
			</a> 
		  </div>
		  
		  <c:forEach items="${pageList.data}" var="courseObject">
		    <div class="course_course" style="width:960px;height:130px;background-color:#FFF;border-bottom:1px solid #DDD;margin-left:-10px;margin-top:0px;">
				<div class="course_coursepci" style="margin-top:20px;margin-left:10px;"> 
				  <c:choose>
				  	<c:when test="${courseObject.courseSubject==2}">
				  	  <a href="/student/curriculum/initCourseTopic/${courseObject.courseId}" target="_blank">
				  		<img src="http://resource.zhuclass.com/cdrmimg/${courseObject.coursePimg}?w=120&h=90" width="120" height="90" />
				  	  </a>
				  	</c:when>
				  	<c:otherwise>
				  	  <a href="/student/curriculum/initCourseCtg/${courseObject.courseId}" target="_blank">
				  		<img src="http://resource.zhuclass.com/cdrmimg/${courseObject.coursePimg}?w=120&h=90" width="120" height="90" />
				  	  </a>
				  	</c:otherwise>
				  </c:choose>
				</div>
				<div class="course_coursepr" style="width:795px;">
					<div class="course_coursepr01" style="width:270px;margin-top:20px;">
						<div class="course_coursepr0101" style="width:250px;"> 
						  <c:choose>
						  	<c:when test="${courseObject.courseSubject==2}">
						  		<a href="/student/curriculum/initCourseTopic/${courseObject.courseId}" target="_blank">${courseObject.courseName} </a> 
						  	</c:when>
						  	<c:otherwise>
						  		<a href="/student/curriculum/initCourseCtg/${courseObject.courseId}" target="_blank">${courseObject.courseName} </a> 
						  	</c:otherwise>
						  </c:choose>
						</div>
						<div class="course_coursepr0102" style="width:250px;">
							<div class="course_coursepr0102r" style="width:230px;">
								<ul>
									<li> 课时：${courseObject.courseTimes}个 <span style="float:right;">学时：${courseObject.studyTime}</span> </li>
									<li> 讲师： <a href="#"> <span style="color:#0A8CD2">${courseObject.courseTeachernm}</span> </a> </li>
									<li style="color:#666;"> 上次学习：${courseObject.lastStudyDate} </li>
								</ul>
							</div>
						</div>
					</div>
					<div class="courtopic_namer" style="margin-left:35px;height:110px;margin-top:20px;">
						<div class="courtopic_namer01" style="margin-top:0px;margin-bottom:5px;"> 
							已获得总学分： <span style="font-size:14px;">
							<c:choose>
							  <c:when test="${courseObject.progress == 100}">
							  	${courseObject.courseCredit}
							  </c:when>
							  <c:otherwise>0</c:otherwise>
							</c:choose> 分
						  </span> 
						</div>
						<div style="width:100%;height:30px;">
						  <div class="courtopic_db03" > 
							<div style="width:${courseObject.progress}%;"></div>
						  </div>
						  <div class="courtopic_db04"> ${courseObject.progress}% </div>
						</div>
						<div class="course_coursepr0102rr" style="position:relative;float:left;left:0px;height:40px;">
						  <c:choose>
						  	<c:when test="${courseObject.courseSubject==2}">
						  		<a href="/student/curriculum/initCourseTopic/${courseObject.courseId}" target="_blank">
						  		  <div class="course_coursepr0102rrb" style="position:relative;float:left;"> 点击学习 </div>
						  		</a> 
						  	</c:when>
						  	<c:otherwise>
						  		<a href="/student/curriculum/initCourseCtg/${courseObject.courseId}" target="_blank">
								  <div class="course_coursepr0102rrb" style="position:relative;float:left;"> 点击学习 </div>
								</a> 
						  	</c:otherwise>
						  </c:choose>
						</div>
					</div>
				</div>
			  </div>
		  </c:forEach>
		  
		  
		  
		<!--  执行分页 ，构造分页 -->
		<script language="javascript">
		  // 初始化点击分页按钮的方法	  
	 	  onPageClickFunction =  function(pageNumber, event){	 		 
		 		var pdata = {};
		 		pdata.type = '';		 	
		    	if(!pageNumber){
		    		pageNumber = 1;
		    	}
		    	AjaxTool("GET","/student/curriculum/${subPath}/"+pageNumber+"/4",pdata,"html",
			    	function (data){		    	
				    	 //返回内容 
				    	if(data){		    		 
				    		$("#contentDiv").html(data);		    		
				    	};
				    } 
		    	);  
	      };
		</script>
		  
		   	<c:if test="${pageList.totalCount > 0}" >
			  <div  id="paging_div" class="tab_page f_array02">   </div>
  			  <script>createPageDivAjax('${pageList.totalCount}','${pageList.pageSize}','${pageList.start}','${type}' );</script>
		 	</c:if>
		 
		</div>
	</div>
 